package cn.edu.cdut.controller;

import cn.edu.cdut.dto.MyRes;
import cn.edu.cdut.dto.WishDate;
import cn.edu.cdut.service.WishDateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author  kobe
 * Created on 2017-06-19-22:53
 */
@RestController
public class WishDateController {

        @Autowired
        private WishDateService wishDateService;

        @GetMapping("/getWishDate")
        public MyRes getWishDate() {
                return wishDateService.getWishDate();
        }

        @PostMapping("/setWishDate")
        public MyRes setWishDate(@RequestBody WishDate wishDate) {
                return wishDateService.setWishDate(wishDate);
        }

}
